# # -*- coding: utf-8 -*-
#
# from flask_script import Manager, Server, Shell, Command
# from werkzeug.contrib.fixers import ProxyFix
# from  vsogame.app import create_app
# from vsogame.database import database
# import vsogame.seeder as seeder
#
#
# def internal_error(error):
#     print('ERROR:', error)
#
#
# def hello():
#     return 'hello core'
#
#
# class Seeder(Command):
#     def __call__(self, *args, **kwargs):
#         print('SEED')
#         seeder.seed()
#
#
# app = create_app()
# app.wsgi_app = ProxyFix(app.wsgi_app)
#
# manager = Manager(app)
# # manager.add_command(Shell(make_context=lambda: dict(app=app, db=d)))
# manager.add_command('runserver', Server(host='0.0.0.0', threaded=True, port='5000'))
# manager.add_command('db', database.manager)
# manager.add_command('seed', Seeder)
#
# if __name__ == '__main__':
#     import sys
#     import locale
#
#     # type('vsogame.extensions.Model')
#     print(locale.getdefaultlocale())
#     # locale.setlocale(locale.LC_ALL, locale='zh_CN.cp936')
#     print(locale.getpreferredencoding(False))
#     default_encoding = 'utf-8'
#     print(sys.getdefaultencoding())
#     manager.run()
